CREATE TABLE [dbo].[Contact]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[FullName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Phone] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ContactType] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_Contact_CreatedDate] DEFAULT (getdate()),
[UpdatedDate] [datetime] NOT NULL CONSTRAINT [DF_Contact_UpdatedDate] DEFAULT (getdate()),
[CreatedUser] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UpdatedUser] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsRead] [bit] NULL CONSTRAINT [DF_Contact_IsNew] DEFAULT ((1))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Contact] ADD CONSTRAINT [PK_Contact] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Loại liên hệ: Góp ý, khách hàng liên hệ', 'SCHEMA', N'dbo', 'TABLE', N'Contact', 'COLUMN', N'ContactType'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Có thể là tên công ty', 'SCHEMA', N'dbo', 'TABLE', N'Contact', 'COLUMN', N'FullName'
GO
